﻿using BaseUtils.Helper;
using BaseUtils.Utils;
using Service.src.Model;
using Service.src.NW.Model;
using System.Runtime.InteropServices;

namespace Service.src.Flow.Api
{
    [ComVisible(true)]
    [ClassInterface(ClassInterfaceType.AutoDual)]
    public class SourceNodeGroupApi
    {

        /// <summary>
        /// 获取所有可使用的节点（菜单栏展示）
        /// </summary>
        /// <returns></returns>
        public string GetSourceNodeGroup()
        {
            Groupre sourceNodeGroups = FileHelper.ReadContent<Groupre>($"{AppData.AppPath}{AppData.NodeHubName}");
            return sourceNodeGroups.ToJson();
        }
    }
}
